/* 基础样式 */
.container {
  padding: 0;
  background-color: #f7f8fa;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

/* 搜索栏样式 */
.searchBar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
}

.backButton {
  margin-right: 12px;
}

.backButton img {
  width: 16px;
  height: 16px;
}

.searchInput {
  flex: 1;
  position: relative;
  margin-right: 12px;
}

.searchInput input {
  width: 100%;
  height: 28px;
  padding: 0 36px 0 16px;
  border: gray 1px solid;
  border-radius: 18px;
  font-size: 12px;
  box-sizing: border-box;
}

.clearInput {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  font-size: 16px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.searchButton {
  font-size: 12px;
  color: #333;
  background: none;
  border: none;
  padding: 0;
  white-space: nowrap;
}

/* 历史搜索区域 */
/* 修改后的CSS样式 */
.historySection {
  padding: 16px;
  margin-top: 8px;
}

.sectionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sectionHeader h3 {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.clearControls {
  display: flex;
  align-items: center;
}

.buttonGroup {
  display: flex;
  gap: 10px;
}

.clearAllButton,
.finishButton {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 4px;
  border: none;
  background-color: #f7f8fa;
  color: #333;
}

.editButton {
  background: none;
  border: none;
  padding: 0;
}

.trashIcon {
  width: 20px;
  height: 20px;
}

.historyList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.historyItem {
  width: auto;
  position: relative;
  background-color: #fff;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 13px;
  color: #333;
}

.historyText {
  /* padding-right: 20px; */
  cursor: pointer;
}

.deleteButton {
  position: absolute;
  right: -1px;
  top: 51%;
  transform: translateY(-95%);
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  width: 19px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 热门搜索区域 */
.hotSection {
  padding: 16px;
}

.hotSection h3 {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin: 0 0 12px 0;
}

.hotList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hotItem {
  position: relative;
  background-color: #fff;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 13px;
  color: #333;
}

/* 商品列表 */
.shop {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px;
}

.shop_item {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.shop_item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.shop_item p {
  font-size: 13px;
  color: #333;
  margin: 8px 8px 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  height: 36px;
}

.shop_item span {
  display: block;
  font-size: 11px;
  color: #999;
  margin: 0 8px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.items {
  display: flex;
  align-items: center;
  margin: 0 8px 8px;
}

.items p {
  font-size: 14px;
  color: #f23030;
  font-weight: bold;
  margin: 0;
  height: auto;
}

.items del {
  font-size: 11px;
  color: #999;
  margin-left: 4px;
}

/* 状态样式 */
.loading,
.error,
.emptyState {
  padding: 40px 0;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.error {
  color: #f23030;
}
